{% extends "RegardProductsBundle::layout.html.twig" %}

{% block title %}Acheter parfums Marseille Chartreux : Diesel, Dior...{% endblock %}

{% block content %}

<div id="PRODUCTS">
	
    <div id="div_add">
        {% if is_granted('ROLE_ADMIN') %}
            <a href="{{ path('regard_products_brand_add') }}">Ajouter une marque</a>
        {% endif %}
          
		<div id="notice">
			{% for flashMessage in app.session.flashbag.get('notice') %}
				{{ flashMessage }}
			{% endfor %}
		</div>
    </div>
    
    <div class="brand_empty"></div>
    
    {% for brand in brandList %}
        
      <div class="brand">
		<a href="{{ path('regard_list_products', 
						{'brandId': brand.id, 'brandName': brand.name|replace({' ': "-"})}) }}">
			<img class="logo" src="{{ asset('img/content/'~brand.logo) }}" title="{{ brand.name }}" alt="{{ brand.name }}" />
		</a>
		<br />
			  
		{% if is_granted('ROLE_ADMIN') %}
			<span>
				<a href="{{ path('regard_products_brand_edit', {'brandId': brand.id}) }}">Mod</a>
			</span>
			<span>
				&#124;
			</span>
			<span>
				<a href="{{ path('regard_products_brand_delete', {'brandId': brand.id}) }}">Suppr</a>
			</span>
		{% endif %}
      </div>
        
    {% endfor %}
</div>

{% endblock %}
